﻿Module modWRDBGIS
    Public Sub Main()
        System.Windows.Forms.Application.EnableVisualStyles()
        With New WRDB.Graph.frmGIS(Nothing, "", "", WRDB.Graph.frmGIS.enumMode.Animate, Nothing)
            If My.Application.CommandLineArgs.Count = 0 Then
                .ShowDialog()
            Else
                Dim cmdLine As String = My.Application.CommandLineArgs(0).Replace("""", "")
                If cmdLine.ToUpper.Replace("/", "-") = "-L" Then
                    .LoadLast = True
                    .ShowDialog()
                ElseIf My.Computer.FileSystem.FileExists(cmdLine.Replace("""", "")) Then
                    .LoadFile = cmdLine.Replace("""", "")
                    .ShowDialog()
                Else
                    MessageBox.Show("WRDBGIS usage:\n\t-L or /L\t= load last map\n\tFilename\t= load specified .gis file on startup (enclose in quotes if path contains spaces)".Replace("\n", vbCr).Replace("\t", vbTab), "WRDBGIS", MessageBoxButtons.OK, MessageBoxIcon.Error)
                End If
            End If
            .Dispose()
        End With
    End Sub
End Module
